package com.fyl.pattern.flyweight;

public class Client {
    public static void main(String[] args) {
        BoxFactory instance = BoxFactory.getInstance();

        AbstractBox i = instance.getShape("I");
        AbstractBox i2 = instance.getShape("I");
        AbstractBox l = instance.getShape("L");

        i.display("灰色");
        i2.display("绿色");
        System.out.println(i==i2);
        System.out.println(i==l);
    }
}
